package rs.etf.kdp.server;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Part implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 846467913340950022L;
	
	private List<String> components;
	private List<TokenizedConnection> connections;
	private long serverId;
	private Object type;
	private String clientIdentification;
	private long logicalTime;
	
	public Part(long id, String identification, Object t, long time)
	{
		components = new ArrayList<String>();
		connections = new ArrayList<TokenizedConnection>();
		serverId = id;
		type = t;
		clientIdentification = identification;
		logicalTime = time;
	}
	
	public long getLogicalTime() {
		return logicalTime;
	}

	public void setLogicalTime(long logicalTime) {
		this.logicalTime = logicalTime;
	}

	public void addComponent(String comp)
	{
		components.add(comp);
	}
	
	public void addConnection(TokenizedConnection tcnn)
	{
		connections.add(tcnn);
	}
	
	public void addListOfConnections(List<TokenizedConnection> lcnn)
	{
		connections.addAll(lcnn);
	}

	public List<String> getComponents() {
		return components;
	}

	public void setComponents(List<String> components) {
		this.components = components;
	}

	public List<TokenizedConnection> getConnections() {
		return connections;
	}

	public void setConnections(List<TokenizedConnection> connections) {
		this.connections = connections;
	}

	public long getServerId() {
		return serverId;
	}

	public void setServerId(long serverId) {
		this.serverId = serverId;
	}

	public Object getType() {
		return type;
	}

	public void setType(Object type) {
		this.type = type;
	}

	public String getClientIdentification() {
		return clientIdentification;
	}

	public void setClientIdentification(String clientIdentification) {
		this.clientIdentification = clientIdentification;
	}
	
	
	
	
	
}
